home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / AECUR100.ARJ / DRAWBOX.C < prev    next >
C/C++ Source or Header  |  1990-03-08  |  665b  |  29 lines

  1. /*--------------------------------------------------------------------
  2.  *
  3.  *  drawbox.c
  4.  *
  5.  *  copyright (c) 1987,88,89,90 J. Alan Eldridge
  6.  *
  7.  *  draws a box on win, with dimensions lines x cols, using v and h
  8.  *  the box is drawn at the current cursor location
  9.  *
  10.  *  v and h are interpreted as desribed in box.c
  11.  *  
  12.  *--------------------------------------------------------------------
  13.  */
  14.  
  15. #include "curses.h"
  16.  
  17. drawbox(win,lines,cols,v,h)
  18. WINDOW *win;
  19. {
  20.   WINDOW *bwin,*subwin();
  21.  
  22.   bwin = subwin(win,lines,cols,win->orgy+win->cury,win->orgx+win->curx);
  23.   if (!bwin)
  24.     return ERR;
  25.   box(bwin,v,h);
  26.   delwin(bwin);
  27.   return OK;
  28. }
  29.